package cn.b.sky.mes.mm.model;

import org.apache.commons.lang3.StringUtils;

import cn.b.sky.common.model.ImeCommon;

/**
 * 
 * <strong>Title : Safetyinventroy.java<br></strong>
 * <strong>Package : cn.b.sky.mes.mm.model<br></strong>
 * <strong>Description : </strong>安全库存<br> 
 * <strong>Create on : 2016-3-1 下午1:41:05<br></strong>
 * <p>
 * @author lidapeng<br>
 * @version <strong>v1.0.0</strong><br>
 * <br>
 * <strong>修改历史:</strong><br>
 * 修改人    |    修改日期    |    修改描述<br>
 * -------------------------------------------<br>
 * <br>
 * <br> 
 */
public class Safetyinventroy extends ImeCommon {

  /**
   * 主键
   */
  private Long id;

  /**
   * 物料编码
   */
  private String materialCode;

  /**
   * 物料描述，页面展示
   */
  private String materialText;

  /**
   * 仓库
   */
  private String warehouseCode;

  /**
   * 仓库描述 ，頁面展示
   */
  private String warehouseText;

  /**
   * 库位
   */
  private String storageLocationCode;

  /**
   * 库位描述，頁面展示
   */
  private String storageLocationText;

  /**
   * 安全库存
   */
  private Double safetyInventory;

  /**
   * 最大库存
   */
  private Double maxInventory;

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getMaterialCode() {
    return materialCode;
  }

  public void setMaterialCode(String materialCode) {
    this.materialCode = materialCode;
  }

  public String getMaterialText() {
    return materialText;
  }

  public void setMaterialText(String materialText) {
    this.materialText = materialText;
  }

  public String getWarehouseCode() {
    return warehouseCode;
  }

  public void setWarehouseCode(String warehouseCode) {
    this.warehouseCode = warehouseCode;
  }

  public String getStorageLocationCode() {
    return storageLocationCode;
  }

  public void setStorageLocationCode(String storageLocationCode) {
    this.storageLocationCode = storageLocationCode;
  }

  public Double getSafetyInventory() {
    return safetyInventory;
  }

  public void setSafetyInventory(Double safetyInventory) {
    this.safetyInventory = safetyInventory;
  }

  public Double getMaxInventory() {
    return maxInventory;
  }

  public void setMaxInventory(Double maxInventory) {
    this.maxInventory = maxInventory;
  }

  public String getWarehouseText() {
    return warehouseText;
  }

  public void setWarehouseText(String warehouseText) {
    this.warehouseText = warehouseText;
  }

  public String getStorageLocationText() {
    return storageLocationText;
  }

  public void setStorageLocationText(String storageLocationText) {
    this.storageLocationText = storageLocationText;
  }

  public Boolean isNullObject() {
    if (StringUtils.isBlank(this.materialCode)) {
      return true;
    }
    //新增的時候warehouseCode不能為空
    if (this.id == null && StringUtils.isBlank(this.warehouseCode)) {
      return true;
    }
    return false;
  }
}
